package com.epam.qanda.db.service;

import com.epam.qanda.db.dao.impl.MessageDao;

public class MessageService {
	public <T> void create(T element) {
		new MessageDao().create(element);
	}

	public void delete(Integer id){
		new MessageDao().delete(id);
	}
	public <T> T getAllMessages() {
		return new MessageDao().getAllMessages();
	}

	public <T> T getUnreadMessages() {
		return new MessageDao().getUnreadMessages();
	}

	public <T> T getAlreadyReadMessages() {
		return new MessageDao().getAlreadyReadMessages();
	}

	public void setCheckedById(Integer messageId) {
		new MessageDao().setCheckedById(messageId);

	}
}
